package com.yangzheandroid.rxmvp.view.activity.dialog;

import android.support.v7.widget.RecyclerView;

import com.yangzheandroid.rxmvp.R;
import com.yangzheandroid.rxmvp.base.BaseActivity;
import com.yangzheandroid.rxmvp.presenter.dialog.DialogListPresenter;
import com.yangzheandroid.rxmvp.widget.dialog.PrettyProgressDialog;
import com.yangzheandroid.yzlibrary.RefreshLayout;

import butterknife.BindView;

public class DialogListActivity extends BaseActivity<DialogListPresenter> implements DialogListConstract.View {
    @BindView(R.id.dialog_list)
    RecyclerView mDialogList;
    @BindView(R.id.prl_layout)
    RefreshLayout mPrlLayout;

    private PrettyProgressDialog mPrettyProgressDialog;



    @Override
    protected void initInject() {
        getActivityComponent().inject(this);
    }


    @Override
    public void showLoading() {
        mPrettyProgressDialog = showLoadingDialog();
    }

    @Override
    public void hideLoading() {
        stopLoadingDialog();
    }

    @Override
    public RecyclerView getRecycleView() {
        return mDialogList;
    }

    @Override
    public RefreshLayout getPullToRefresh() {
        return mPrlLayout;
    }

    @Override
    protected int getLayout() {
        return R.layout.activity_dialog_list;
    }

    @Override
    protected void initEventAndData() {
        mPresenter.start();
    }
}
